﻿using System;
using System.Collections.Generic;

namespace Geometry
{
    /// <summary>
    /// 点链关系
    /// </summary>
    public class PointDIME : Point
    {
        #region 字段属性
        public List<string> PolylineIDList { get; set; }
        #endregion

        #region 构造器
        public PointDIME(string id, params string[] polylineIDs)
        {
            ID = id;
            PolylineIDList = new List<string>();
            PolylineIDList.AddRange(polylineIDs);
        }

        public PointDIME() { }
        #endregion

        #region 方法
        public new void WriteLine()
        {
            Console.Write($"{ID}\t(");
            for (int i = 0; i < PolylineIDList.Count; i++)
            {
                if (i != PolylineIDList.Count - 1)
                    Console.Write($"{PolylineIDList[i]},");
                else
                    Console.Write($"{PolylineIDList[i]})\n");
            }
        }
        #endregion
    }
}
